package chuangyi.com.org.ViewModel;

import android.content.Context;
import android.databinding.Bindable;
import android.view.View;

import chuangyi.com.org.DOMIHome.R;
import chuangyi.com.org.DOMIHome.adapter.BindingListItem;

/**
 * Created by zxh on 16/12/7.
 */

public class AmountItem extends BindingListItem {

    private String title;
    private double amount;
    private EditReward parent;

    @Bindable
    public String getTitle() {
        return title;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public AmountItem(Context context, String title, double amount, EditReward reward){
        super(context, R.layout.i_amount);
        this.title = title;
        this.amount = amount;
        this.parent = reward;
    }

    public void onClickAmount(View view){

        parent.setAmount(String.valueOf(this.amount));
    }
}
